const path=require('path')
const fs=require('fs');
const { log } = require('console');

// ../会消耗前面的路径
const pathStr=path.join('/a','/b/c','../../','/d','/e')
console.log(pathStr);// \a\d\e


fs.readFile(path.join(__dirname,'./1.txt'),'utf8',function(err,dataStr){
  if(err){
    return console.log(err.message);
  }
  console.log(dataStr);
})
